<?php
namespace app\wechat\controller;
use app\model\Banner;
use app\model\ItemsCate;

class IndexController extends BaseController
{
    public function _initialize()
    {
        parent::_initialize();
    }

    public function index(){
//        $banner = Banner::all(['status' => '1']);
//        $this->assign('banner', $banner);
//        $first_banner = $banner[0];
//        $this->assign('first_banner', $first_banner);
        $cate_id = $this->request->param('cate');
        $cate = ItemsCate::column('id,cate_name');
        $this->assign('cate', $cate);
        $this->assign('cate_id', $cate_id);
        return $this->fetch();
    }
}
